When the overview gets hidden during the startup animation, the callback
would still change the state to SHOWN, despite the overview not being
shown.
This can happen for example if a `monitors-changed` signal triggers a
relayout during startup.
See: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2514#note_1683525
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2667>
this._changeShownState(OverviewShownState.SHOWING);
this._overview.runStartupAnimation(() => {
+ // Overview got hidden during startup animation
+ if (this._shownState !== OverviewShownState.SHOWING) {
+ callback();
+ return;
+ }
+
if (!this._syncGrab()) {
callback();
return;